POV-Ray : Newsgroups : povray.beta-test : Function parameter bug : Re: Function parameter bug Server Time
30 Jul 2024 20:20:18 EDT (-0400)
  Re: Function parameter bug  
From: Rune
Date: 27 Oct 2001 16:18:50
Message: <3bdb16aa@news.povray.org>
"Thorsten Froehlich" wrote:
> Sorry, if you still ask this question than I failed
> and I am unable to explain it better.  Sorry!

Anyway, if it can't be fixed, I presume that means that all functions in
include files have to use very special names for the parameters to minimize
the risc that the user has variables with identical names.

For example these functions from math.inc:

#declare sind = function (V) {sin(radians(V))}
#declare adj_range2 = function (V, Mn, Mx, OMn, OMx) {((V - Mn)/(Mx -
Mn))*(OMx - OMn) + OMn}

must be changed to something like:

#declare sind = function (__V) {sin(radians(__V))}
#declare adj_range2 = function (__V, __Mn, __Mx, __OMn, __OMx) {((__V -
__Mn)/(__Mx - __Mn))*(__OMx - __OMn) + __OMn}

Is that really so?

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated June 26)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.